package com.lsp.rocketmqcousumer.receiver;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 事务消费
 */
@Component
@RocketMQMessageListener(
        topic = "transactionTopic",
        consumerGroup = "TRANSACTION_CONSUME_GROUP_TEST"
)
public class TransactionReceiver implements RocketMQListener<String> {

    @Override
    public void onMessage(String msg) {
        System.out.printf("Consumer 事务消费，收到消息: %s \n",msg);
    }
}
